import Layout from "@/page/Layout";
import Month from "@/page/Month";
import New from "@/page/New";
import Year from "@/page/Year";
import { createBrowserRouter } from "react-router-dom";
// 创建路由实例 绑定path element 
const router = createBrowserRouter([
     {
        path:'/',
        element: <Layout></Layout>,
        children:[
            {
                index: true,
                element: <Month></Month>
            },
            {
                path:'year',
                element:<Year></Year>
            }
        ]
     },
     {
        path:'/new',
        element: <New></New>
     }
])
export default router; 